import React, {Component} from 'react'
import {Link} from 'react-router-dom'

const menu = [
    {
        name: 'refDemo',
        link: '/ref',
    },
    {
        name: 'forwardRefDemo',
        link: '/forwardRef',
    },
    {
        name: 'ContextDemo',
        link: '/context',
    },
    {
        name: 'suspenseDemo',
        link: '/suspense',
    },
    {
        name: 'hooksDemo',
        link: '/hooks',
    },
]

export default class Nav extends Component {
    render() {
        return <div>
            {menu.map(item => <Link to={item.link} key={item.name}><div>{item.name}</div></Link>)}
        </div>
    }
}